package com.bto.solar.work.vo;

import com.bto.solar.work.entity.Area;
import com.bto.solar.work.entity.Company;
import com.bto.solar.work.utils.tree.ITree;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @author Administrator
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class CompanyVO extends Company {

    @ApiModelProperty("公司全部地址")
    private String allAddress;

    @ApiModelProperty("省份对象")
    private Area province;

    @ApiModelProperty("城市对象")
    private Area city;

    @ApiModelProperty("区/县对象")
    private Area district;

    @Data
    @EqualsAndHashCode(callSuper = true)
    @Accessors(chain = true)
    @NoArgsConstructor
    public static class AreaVO extends Area implements Serializable, ITree<CompanyVO.AreaVO> {
        private List<CompanyVO.AreaVO> childList;
        @Override
        public void setChildList(List<CompanyVO.AreaVO> childList) {
            this.childList = childList;
        }

    }



}
